import time
from selenium import webdriver

url = 'https://bj.58.com/chuzu/?utm_source=market&spm=u-2d2yxv86y3v43nkddh1.BDPCPZ_BT&PGTID=0d100000-0000-1f47-ffbd-70368e445c05&ClickID=2'

driver = webdriver.Chrome(executable_path=r'E:\ChromeDriver\chromedriver_win32/chromedriver.exe')

driver.get(url)

el_list = driver.find_elements_by_xpath('//div[@class="des"]//a')

print(len(el_list))
# 获取文本
for el in el_list[:10]:
    print(el.text)

# 获取属性
for el in el_list[:10]:
    print(el.get_attribute('href'))

time.sleep(5)
driver.quit()
